﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sinav.aspx.cs" Inherits="SinavSistemi.sinav" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 900px;
            border-style:solid;
            border-color:gray;
        }
        .auto-style2 {
            width: 137px;
        }
        .auto-style3 {
            height: 28px;
        }
    </style>
    <link href="css/style.css" rel="stylesheet" />

</head>
<body>
    <form id="form1" runat="server">
    <div class="merkez" >
        <div class="logo" >
            <img src="images/logo_(1)png.png" style="float:left; " /> <br />
                    <div class="manset">Sinav Sistemine Hoş Geldiniz</div>   </div>

        <table class="auto-style1">
            <tr>
                <td class="auto-style2">Adi Soyadi</td>
                <td>
                    <asp:Label ID="lblAdSoyad" runat="server" Text="Label"></asp:Label></td>
            </tr>
            <tr>
                <td class="auto-style2">Çalıştığı Fırma</td>
                <td>
                    <asp:Label ID="lblFirma" runat="server" Text="Label"></asp:Label></td>
            </tr>
    
            <tr>
                <td class="auto-style2">E-mail adreesi</td>
                <td>
                    <asp:Label ID="lblEmail" runat="server" Text="Label"></asp:Label></td>
            </tr>

        </table>
        <br />
        <br />


        <br />
        <table class="auto-style1">
            <tr>               
                <td>
                   
                    <asp:Label ID="lblSinavismi" runat="server" Text="Label" Font-Size="X-Large" Font-Bold="True"></asp:Label></td>
            </tr>
            <tr>    <asp:HiddenField ID="hdresimdurum" runat="server" value="yok"/>           
                <td><% if (hdresimdurum.Value != "yok" )
                       {
                           
                           Response.Write("<img  alt='empty' src="+hdresimdurum.Value.ToString()+" />");
                       } 
                       %></td>
                
            </tr>
             <tr>        
                       
                <td>
                    <asp:Label ID="lblSoru" runat="server" Text="Soru" Font-Size="X-Large" Font-Bold="True" Font-Strikeout="False" Font-Underline="True" ForeColor="#990000"></asp:Label></td>
            </tr>
             <tr><td>
                 <br />
                 </td></tr>      
             <tr>               
                <td>
                    <asp:RadioButton ID="sec1" GroupName="soru" runat="server" Font-Size="Larger" OnCheckedChanged="sec1_CheckedChanged" AutoPostBack="True" />
                 </td>
            </tr>
             <tr>               
                <td>
                    <asp:RadioButton ID="sec2" GroupName="soru" runat="server" AutoPostBack="True" OnCheckedChanged="sec2_CheckedChanged" />
                 </td>
            </tr>
             <tr>               
                <td class="auto-style3">
                    <asp:RadioButton ID="sec3" GroupName="soru" runat="server" AutoPostBack="True" OnCheckedChanged="sec3_CheckedChanged"   />
                 </td>
            </tr>
             <tr>               
                <td>
                    <asp:RadioButton ID="sec4" GroupName="soru" runat="server" AutoPostBack="True" OnCheckedChanged="sec4_CheckedChanged"   />
                 </td>
            </tr>
        </table>
        <br />
        <br />
        <br />
        <table>
            <tr>
                <td><a href="<%    
                        
                        if (Request.QueryString["soruID"] != null)
                        {
                            int i =Convert.ToInt32(Request.QueryString["soruID"]);
                            string sinav = Request.QueryString["sinavID"].ToString();
                            string usid ="";
                            if (Request.QueryString["userID"] != null)
                            {
                               usid = Request.QueryString["userID"];
                            }
                            else
                            {
                                usid = Session["userID"].ToString();
                            }
                            
                            if (i==1)
                            {
                               Response.Write("sinav.aspx?sinavID="+sinav+"&soruID="+i.ToString()+"&userID="+usid );
                            }
                            else if (i > 20)
                            {
                                Response.Write("sinav.aspx?sinavID=" + sinav + "&soruID=1&userID=" + usid);
                            }
                            else
                            {
                                Response.Write("sinav.aspx?sinavID=" + sinav + "&soruID=" + (i - 1).ToString() + "&userID=" + usid);
                            }

                           
                        }
                         %>">Önceki Soru</a></td>
                <td><%
                        for (int i = 1; i < 21; i++)
                        {
                            
                            string sinav = Request.QueryString["sinavID"].ToString();
                            string usid = "";
                            if (Request.QueryString["userID"] != null)
                            {
                                usid = Request.QueryString["userID"];
                            }
                            else
                            {
                                usid = Session["userID"].ToString();
                            }

                            Response.Write("<a style='margin-left:5px;margin-right:5px;' href=sinav.aspx?sinavID=" + sinav + "&soruID=" + i.ToString() + "&userID=" + usid + ">" + i + "</a>");
                        }
                        
                         %></td>
                <td><a href="<%  if (Request.QueryString["soruID"] != null)
                                 {
                                     int i = Convert.ToInt32(Request.QueryString["soruID"]);
                                     string sinav = Request.QueryString["sinavID"].ToString();
                                     string usid = "";
                                     if (Request.QueryString["userID"] != null)
                                     {
                                         usid = Request.QueryString["userID"];
                                     }
                                     else
                                     {
                                         usid = Session["userID"].ToString();
                                     }
                                     if (i == 20)
                                     {
                                         Response.Write("sinav.aspx?sinavID=" + sinav + "&soruID=" + i.ToString() + "&userID=" + usid);
                                     }
                                     else if (i > 20)
                                     {
                                         Response.Write("sinav.aspx?sinavID=" + sinav + "&soruID=20&userID=" + usid);
                                     }
                                     else
                                     {
                                         Response.Write("sinav.aspx?sinavID=" + sinav + "&soruID=" + (i + 1).ToString() + "&userID=" + usid);
                                     }


                                 } %>"  >Sonraki Soru</a></td>
            </tr>

        </table>

        <table>
            <tr>
                <td>
                    <div style="margin-left:auto; margin-right:auto;"> <asp:Button ID="Button1" runat="server" Text="Sinavi Bitir" OnClick="Button1_Click" class="button" />  </div> 
                </td>
            </tr>
        </table>
        
    </div>
    </form>
</body>
</html>
